//
//  ScoreboardViewController.m
//  LanQiuQuan
//
//  Created by TonyGenius on 16/3/5.
//  Copyright © 2016年 Rip. All rights reserved.
//

#import "ScoreboardViewController.h"
#import "createViewController.h"
#import "Marco.h"

@interface ScoreboardViewController ()
{
    XMTabBarController *_tab;
}

@property (weak, nonatomic) IBOutlet UIButton *creatBtn;

@property (weak, nonatomic) IBOutlet UIButton *myGameBtn;

@end

@implementation ScoreboardViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
//    [self initBtn];
    [self initNavTab];
}

- (void)viewWillAppear:(BOOL)animated
{
    _tab = (XMTabBarController *)self.tabBarController;
    [_tab xmTabBarHidden:NO animated:YES];
}

- (void)initBtn
{
    _creatBtn.layer.masksToBounds = YES;
    _creatBtn.layer.cornerRadius = 10;
    
    _myGameBtn.layer.masksToBounds = YES;
    _myGameBtn.layer.cornerRadius = 10;
    
    _creatBtn.layer.borderWidth = 2.0;
    _myGameBtn.layer.borderWidth = 2.0;
    _creatBtn.layer.borderColor = [UIColor lightGrayColor].CGColor;
    _myGameBtn.layer.borderColor = [UIColor lightGrayColor].CGColor;
    
}

- (void)initNavTab
{
    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"barBG"] forBarMetrics:UIBarMetricsDefault];
//    [self.navigationController.navigationBar setBarTintColor:[UIColor lightGrayColor]];
    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
    self.navigationItem.title = @"记分板";
    
    
//    UIBarButtonItem *oneItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(itemAdd)];
//    UIBarButtonItem *twoItem = [[UIBarButtonItem alloc] initWithTitle:@"下拉" style:UIBarButtonItemStylePlain target:self action:@selector(pushDown)];
//    [oneItem setTintColor:[UIColor whiteColor]];
//    [twoItem setTintColor:[UIColor whiteColor]];
//    
//    NSArray *Items = [NSArray arrayWithObjects:twoItem,oneItem, nil];
//    self.navigationItem.rightBarButtonItems = Items;
    
}

- (IBAction)creatGame:(id)sender {
    createViewController *createVC = [[createViewController alloc] init];
    [self.navigationController pushViewController:createVC animated:YES];
    
}


- (IBAction)myGame:(id)sender {
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
